const css3dRender = {
	data: {
		cssRender: new THREE.CSS3DRenderer(),
		data3dDom: null
	},
	methods: {
		initCss3DScene() {
			const {
				cssRender
			} = this
			cssRender.setSize(window.innerWidth, window.innerHeight)
			cssRender.domElement.style.position = "absolute"
			cssRender.domElement.style.top = 0
			document.getElementById("app").appendChild(cssRender.domElement)
			this.load3DDom()
		},
		load3DDom(){
			const {
				cssRender,
				scene,
				camera
			} = this
			const d3DDom = document.getElementById("3d-dom")
			if (d3DDom) {
				this.data3dDom = new THREE.CSS3DObject(d3DDom)
				const scale = 0.1
				d3DDom.style.opacity = 1
				this.data3dDom.scale.set(scale, scale, scale)
				this.data3dDom.position.set(0, -9, -14)
				this.data3dDom.rotateY(190.1)
				this.scene.add(this.data3dDom)
			}
			cssRender.render(scene, camera)
		}
	}
}
